package main

import "fmt"

func main() {
	var kernel [32]float64
	var delta [676]float64
	for i := 0; i < 32; i++ {
		fmt.Scan(&kernel[i])
	}
	for i := 0; i < 676; i++ {
		fmt.Scan(&delta[i])
	}
	var del [1352]float64
	fmt.Println("Opt:")
	for i := 0; i < 13; i++ {
		for j := 0; j < 13; j++ {
			for k := 0; k < 8; k++ {
				var tmp float64
				for l := 0; l < 4; l++ {
					tmp += kernel[k*4+l] * delta[i*13*4+j*4+l]
				}
				del[i*13*8+j*8+k] = tmp
				// fmt.Printf("%f ", tmp)
			}
			// fmt.Printf("\n")
		}
	}

}
